﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Decorate
{
    public class Espresso : Beverage
    {
        public Espresso()
        {
            description = "Espresso";
        }

        public override Beverage.Size getSize()
        {
            return this.size;
        } 

        public override double cost() 
        {
            // 按照杯子大小做特殊处理
            double dRtn = 0.0;

            switch (getSize())
            {
                case Size.tall:     dRtn = 1.89; break;
                case Size.grande:   dRtn = 1.99; break;
                case Size.venti:    dRtn = 2.09; break;
            }

            return dRtn;
        }

        public override string getDescription()
        {
            return description;
        }
    }
}
